Leetcode solving: 541 Reverse String II